<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="../Connections/A146240Connection.jsp" %>
<%
String Recordset1__MMColParam = "1";
if (session.getValue("MM_UserAuthorization") !=null) {Recordset1__MMColParam = (String)session.getValue("MM_UserAuthorization");}
%>
<%
Driver DriverRecordset1 = (Driver)Class.forName(MM_A146240Connection_DRIVER).newInstance();
Connection ConnRecordset1 = DriverManager.getConnection(MM_A146240Connection_STRING,MM_A146240Connection_USERNAME,MM_A146240Connection_PASSWORD);
PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("SELECT ORDER_ID, ORDER_DATE FROM A152786.ORDER_BOOK WHERE USER_ID = '" + Recordset1__MMColParam + "' ORDER BY ORDER_ID DESC");
ResultSet Recordset1 = StatementRecordset1.executeQuery();
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
Object Recordset1_data;
int Recordset1_numRows = 0;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
Recordset1_numRows += Repeat1__numRows;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<table border="1">
  <tr>
    <td>ORDER_ID</td>
    <td>ORDER_DATE</td>
  </tr>
  <% while ((Recordset1_hasData)&&(Repeat1__numRows-- != 0)) { %>
  <tr>
    <td><a href="orderDetail.jsp?orderId=<%=(((Recordset1_data = Recordset1.getObject("ORDER_ID"))==null || Recordset1.wasNull())?"":Recordset1_data)%>" ><%=(((Recordset1_data = Recordset1.getObject("ORDER_ID"))==null || Recordset1.wasNull())?"":Recordset1_data)%></a></td>
    <td><%=(((Recordset1_data = Recordset1.getObject("ORDER_DATE"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
  </tr>
  <%
  Repeat1__index++;
  Recordset1_hasData = Recordset1.next();
}
%>
</table>


</body>
</html>
<%
Recordset1.close();
StatementRecordset1.close();
ConnRecordset1.close();
%>
